/* 顶栏样式 */
header {
    background-color: #333;
    color: white;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 10;
}

header h1 {
    margin: 0;
}

.add-btn {
    font-size: 24px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}

.menu {
    position: absolute;
    top: 50px;
    right: 10px;
    background: white;
    border-radius: 5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
}

.menu.slide-in {
    display: flex;
}

.menu a {
    padding: 10px;
    text-decoration: none;
    color: #333;
}

.menu a:hover {
    background: #f4f4f4;
}

/* 页面样式优化 */
.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

main {
    margin-top: 60px;
    margin-bottom: 60px;
    padding: 10px;
}

footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    display: flex;
    justify-content: space-around;
    padding: 10px;
    background: #333;
    color: white;
}
/* 修改密码弹窗样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    text-align: center;
    width: 300px;
}

.modal-content h2 {
    margin: 0 0 20px;
}

.modal-content label {
    display: block;
    margin-bottom: 5px;
    text-align: left;
}

.modal-content input {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

.modal-content button {
    margin: 5px;
}

/* 红色退出登录按钮 */
button.logout {
    background-color: red;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
}

button.logout:hover {
    background-color: darkred;
}

/* 成功和错误提示 */
.success {
    color: green;
    font-size: 14px;
}
/* 表单容器样式 */
.form-container {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    padding: 30px 40px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    margin: auto;
}

h1 {
    margin-bottom: 20px;
    font-size: 24px;
    color: #333;
    font-weight: bold;
}

form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

label {
    text-align: left;
    font-size: 14px;
    color: #666;
}

input {
    padding: 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 5px;
    width: 100%;
    box-sizing: border-box;
}

button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #45a049;
}

p {
    font-size: 14px;
    margin-top: 10px;
    color: #666;
}

a {
    color: #4CAF50;
    text-decoration: none;
    font-weight: bold;
}

a:hover {
    text-decoration: underline;
}

.error {
    color: red;
    font-size: 14px;
}
/* 顶栏样式 */
.chat-app-header {
    background-color: #333;
    color: white;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 10;
}

.chat-app-header-button {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

/* 菜单样式 */
.chat-app-menu {
    position: fixed;
    top: 60px;
    left: 0;
    width: 50%;
    height: 100%;
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
}

.chat-app-menu-hidden {
    display: none;
}

.chat-app-menu-button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
}

.chat-app-menu-button:hover {
    background-color: #45a049;
}

/* 聊天记录样式 */
.chat-app-message {
    margin: 10px 0;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #f9f9f9;
}

.chat-app-message-user {
    margin: 0;
    font-weight: bold;
}

.chat-app-message-time {
    font-size: 12px;
    color: #888;
}

/* 底栏样式 */
.chat-app-footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    background-color: #333;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    box-sizing: border-box;
}

.chat-app-footer-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-right: 10px;
    font-size: 14px;
}

.chat-app-footer-button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
}
/* 顶栏样式 */
.chat-app-header {
    background-color: #333;
    color: white;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 10;
}

.chat-app-header-button {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

/* 菜单样式 */
/* 顶栏样式 */
.chat-app-header {
    background-color: #333;
    color: white;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 10;
}

.chat-app-header h1 {
    margin: 0;
    font-size: 20px;
    flex: 1;
    text-align: center;
}

.chat-app-header-button {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

/* 菜单样式 */
.chat-app-menu {
    position: fixed;
    top: 60px;
    right: 0;
    width: 50%; /* 菜单宽度更大 */
    height: 70%;
    background: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: none;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
}

.chat-app-menu.chat-app-menu-hidden {
    display: none;
}

.chat-app-menu-button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    text-align: left;
}

.chat-app-menu-button:hover {
    background-color: #45a049;
}